<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:set var="count" scope="request">0</c:set>
<div>
	<div class="statTitle">${result.text}</div>
	<table bgcolor="#CCCCCC" border="0" cellspacing="1" cellpadding="2">
		<tr class="tableTitle">
			<td>&nbsp;</td>
			<c:forEach items="${result.areaTitles}" var="areaTitle">
				<td>${areaTitle}</td>
			</c:forEach>
		</tr>
		<tbody bgcolor="#FFFFFF">
			<tr>
				<td>数量</td>
				<c:forEach items="${result.areaValues}" var="areaValue">
					<td>${areaValue}</td>
					<c:set var="count" scope="request">${count + areaValue}</c:set>
				</c:forEach>
			</tr>
			<tr>
				<td>所占比例</td>
				<c:forEach items="${result.areaValues}" var="areaValue">
					<td>
						<c:choose>
							<c:when test="${count != 0}">
								<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">${areaValue/count}</fmt:formatNumber>
							</c:when>
							<c:otherwise>
								<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">0</fmt:formatNumber>
							</c:otherwise>
						</c:choose>
					</td>
				</c:forEach>
			</tr>
		</tbody>
	</table>
</div>